{% extends "base.html" %}

{% block headtitle %}Player Details{% endblock %}


{% block header_scripts %}
<link rel="stylesheet" type="text/css" media="screen,projection,print" href="/m/css/jquery.dataTables.css" />
<link rel="stylesheet" type="text/css" media="screen,projection,print" href="/m/css/jquery.cluetip.css" />

<script type="text/javascript" src="/m/js/lib/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/m/js/lib/jquery.cluetip.js"></script>


<script type="text/javascript">
DIRECTOR_ACCESS_LVL = {{ directorAccessLvl }};
COLOR_THRESHOLDS = {{ colorThresholds|safe }};
AJAX_URL = '/players/{{ player.id }}/data';
COOKIE_NAME = 'ecm_player_characters_table_';
</script>
<script type="text/javascript" src="/m/js/members_table.js"></script>
{% endblock %}



{% block breadcrumbs %}
<li><a href="/">Home</a></li>
<li><a href="/players">Players</a></li>
<li><a href="/players/{{ player.id }}">{{ player.username }}</a></li>
{% endblock %}



{% block main_content %}
<h1 class="pagetitle">Details for player <i>{{player.username}}</i></h1>
{% if player.is_staff and player.is_superuser %}<h1 class="pagetitle error">ECM Administrator</h1>{% endif %}

<h1>Player Details</h1>

<p><b>Account created:</b> {{player.date_joined|date:"Y F d - H:i"}}</p>
<p><b>Last login in ECM:</b> {{player.last_login|date:"Y F d - H:i"}}</p>
<p><b>Owned EVE Accounts:</b> {{eve_accounts}}</p>
<p><b>Owned Characters:</b> {{characters}}</p>

<h1>Groups</h1>

<ul>
{% for g in groups %}
  <li>{{ g }}</li>
{% empty %}
  <p>None</p>
{% endfor %}
</ul>

<h1>Owned Characters</h1>

<form id="search_form" class="search_form">
    <input type="text" id="search_text" value="" />
    <input type="button" class="button" id="search_button" value="Search" />
    <input type="button" class="button" id="clear_search" value="Reset" />
</form>

<table class="table display" id="members_table">
  <thead>
    <tr>
      <th class="top" scope="col" >Name</th>
      <th class="top" scope="col" >Nickname</th>
      <th class="top" scope="col" >Player</th>
      <th class="top" scope="col" >Access Level</th>
      <th class="top" scope="col" >Corp Date</th>
      <th class="top" scope="col" >Last Login</th>
      <th class="top" scope="col" >Location</th>
      <th class="top" scope="col" style="display:none;">Titles</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td colspan="8" class="dataTables_empty">Loading data from server...</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th>Name</th>
      <th>Nickname</th>
      <th>Player</th>
      <th>Access Level</th>
      <th>Corp Date</th>
      <th>Last Login</th>
      <th>Location</th>
      <th style="display:none;">Titles</th>
    </tr>
  </tfoot>

</table>

{% endblock %}